import DIC from "@/const/cust/cust_dic";

export default that => {
  return {
    card: true,
    group: [
      {
        icon: "el-icon-info",
        label: "个人信息",
        prop: "group",
        column: [
          {
            fixed: true,
            labelWidth: 150,
            label: "姓名",
            prop: "name",
            rules: [
              {
                required: true,
                message: "请输入姓名"
              }
            ]
          },
          {
            label: "身份证号",
            labelWidth: 150,
            prop: "sfzh",
            blur: () => {
              that.getObjByIdCard();
            }
            // type: 'input'
            // // rules: [
            // //   {
            // //     min: 6,
            // //     max: 20,
            // //     message: '长度在 18 个字符',
            // //     trigger: 'blur'
            // //   }
            // // ]
          },
          {
            labelWidth: 150,
            label: "性别",
            prop: "xb",
            type: "radio",
            dicData: DIC.SEX
          },
          {
            label: "出生日期",
            labelWidth: 150,
            prop: "csrq",
            type: "date",
            valueFormat: "yyyy-MM-dd",
            format: "yyyy-MM-dd",
            rules: []
          },
          {
            label: "年龄",
            labelWidth: 150,
            type: "number",
            prop: "age",
            rules: []
          },
          {
            label: "民族",
            labelWidth: 150,
            prop: "minzu",
            type: "select",
            filterable: true,
            rules: [],
            dicData: DIC.MINZU
          },
          {
            width: 120,
            label: "工作单位",
            labelWidth: 150,
            prop: "gzdw"
            // rules: [
            //   {
            //     max: 30,
            //     trigger: 'blur'
            //   }
            // ]
          },
          {
            width: 120,
            label: "本人电话",
            labelWidth: 150,
            prop: "brdh",
            type: "phone",
            rules: [
              {
                required: true,
                message: "请输入本人电话"
              }
            ]
          },
          {
            width: 120,
            label: "联系人姓名",
            labelWidth: 150,
            prop: "lxrxm"
            // rules: [
            //   {
            //     required: true,
            //     message: '请输入姓名'
            //   }
            // ]
          },
          {
            width: 120,
            label: "联系人电话",
            prop: "lxrdh",
            type: "phone",
            labelWidth: 150
            // rules: [
            //   {
            //     min: 6,
            //     max: 20,
            //     message: '长度在 11 个字符',
            //     trigger: 'blur'
            //   }
            // ]
          },
          {
            width: 120,
            label: "常住类型",
            prop: "czlx",
            type: "select",
            labelWidth: 150,
            rules: [],
            dicData: DIC.CZLX
          },

          {
            width: 120,
            label: "血型",
            prop: "xuexing",
            type: "select",
            labelWidth: 150,
            rules: [],
            dicData: DIC.XUEXING
          },
          {
            width: 120,
            label: "Rh性",
            prop: "rh",
            type: "select",
            labelWidth: 150,
            rules: [],
            dicData: DIC.RH
          },
          {
            width: 120,
            label: "文化程度",
            prop: "whcd",
            type: "select",
            labelWidth: 150,
            rules: [],
            dicData: DIC.WHCD
          },
          {
            width: 120,
            label: "职业",
            prop: "zhiye",
            type: "select",
            labelWidth: 150,
            rules: [],
            dicData: DIC.ZHIYE
          },
          {
            width: 120,
            label: "婚姻状况",
            prop: "hyqk",
            type: "select",
            labelWidth: 150,
            rules: [],
            dicData: DIC.HYZK
          },

          {
            width: 120,
            label: "医疗费用支付方式",
            prop: "ylfy",
            type: "select",
            labelWidth: 150,
            rules: [],
            dicData: DIC.YLFY
          },
          {
            width: 120,
            label: "暴露史",
            prop: "blshi",
            type: "select",
            labelWidth: 150,
            rules: [],
            dicData: DIC.BLS
          },
          {
            width: 120,
            label: "药物过敏史",
            prop: "ywgms",
            type: "select",
            multiple: true,
            dataType: "string",
            labelWidth: 150,
            rules: [],
            dicData: DIC.YWGMS
          },
          {
            width: 120,
            label: "药物过敏史-其他",
            prop: "ywgmsDes",
            display: false,
            labelWidth: 150,
            rules: [
              {
                required: true,
                message: "请输入药物过敏史"
              }
            ]
          }
        ]
      },
      {
        icon: "el-icon-info",
        label: "家族史",
        prop: "group1",
        column: [
          {
            width: 210,
            label: "父亲",
            prop: "jzsfq",
            type: "select",
            multiple: true,
            labelWidth: 150,
            dataType: "string",
            span: 24,
            rules: [],
            dicData: DIC.JZS
          },
          {
            width: 210,
            label: "其他",
            labelWidth: 150,
            prop: "jzsfqDes",
            span: 12,
            rules: [
              {
                required: true,
                message: "请输入家族史-父亲"
              }
            ]
          },
          {
            labelWidth: 150,
            label: "母亲",
            prop: "jzsmq",
            type: "select",
            multiple: true,
            dataType: "string",
            span: 24,
            dicData: DIC.JZS
          },

          {
            labelWidth: 150,
            label: "其他",
            prop: "jzsmqDes",
            rules: [
              {
                required: true,
                message: "请输入家族史-母亲"
              }
            ]
          },

          {
            labelWidth: 150,
            label: "兄弟姐妹",
            prop: "jzsxdjm",
            type: "select",
            multiple: true,
            dataType: "string",
            span: 24,
            rules: [],
            dicData: DIC.JZS
          },

          {
            labelWidth: 150,
            label: "其他",
            prop: "jzsxdjmDes",
            rules: [
              {
                required: true,
                message: "请输入家族史-兄弟姐妹"
              }
            ]
          },
          {
            labelWidth: 150,
            label: "子女",
            prop: "jzszn",
            type: "select",
            dataType: "string",
            multiple: true,
            span: 24,
            rules: [],
            dicData: DIC.JZS
          },
          {
            labelWidth: 150,
            label: "其他",
            prop: "jzsznDes",
            span: 12,
            rules: [
              {
                required: true,
                message: "请输入家族史-子女"
              }
            ]
          }
        ]
      },
      {
        icon: "el-icon-info",
        label: "遗传病",
        prop: "group2",
        column: [
          {
            label: "有无遗传病",
            labelWidth: 150,
            prop: "ycbs",
            type: "select",
            dicData: DIC.YCB
          },
          {
            label: "遗传病名称",
            labelWidth: 150,
            prop: "ycbDes",
            display: false,
            rules: [
              {
                required: true,
                message: "疾病名称"
              }
            ]
          }
        ]
      },
      {
        icon: "el-icon-info",
        label: "残疾情况",
        prop: "group3",
        column: [
          {
            label: "残疾情况",
            labelWidth: 150,
            prop: "cjqk",
            type: "select",
            multiple: true,
            dataType: "string",
            dicData: DIC.CJQK
          },
          {
            label: "其他残疾",
            labelWidth: 150,
            prop: "cjqkDes",
            display: false,
            rules: [
              {
                required: true,
                message: "疾病名称"
              }
            ]
          }
        ]
      },
      {
        icon: "el-icon-info",
        label: "生活环境",
        prop: "group4",
        column: [
          {
            label: "厨房排风设施",
            labelWidth: 150,
            prop: "shhjcfpfcs",
            type: "select",
            dicData: DIC.CFPFCS
          },
          {
            label: "燃料类型",
            labelWidth: 150,
            prop: "shhjrllx",
            type: "select",
            dicData: DIC.RLLX
          },
          {
            label: "饮水",
            labelWidth: 150,
            prop: "shhjys",
            type: "select",
            dicData: DIC.YS
          },
          {
            label: "厕所",
            labelWidth: 150,
            prop: "shhjcs",
            type: "select",
            dicData: DIC.CS
          },
          {
            label: "禽畜栏",
            labelWidth: 150,
            prop: "shhjqcl",
            type: "select",
            dicData: DIC.QCL
          }
        ]
      }
    ]
  };
};
